const mongoose = require('../../../dao/mongo/mongo');

const Schema = mongoose.Schema;
const upgradeSchema = new Schema({
  uid: {    //用户ID
    type: String,
    required: true
  },
  coins: {    //金币数量，改位String，防止溢出
    type: String,
    default: "5000"
  },
  depth_level:{    //深度等级
    type:Number,
    default: 1
  },
  quality_level:{   //品质等级
    type:Number,
    default: 1
  },
  spreed_level:{    //速度等级
    type:Number,
    default: 1
  },
  last_update_coins: {    //上次更新金币时间
    type: Number,
    default: new Date().valueOf()
  },
});

module.exports = mongoose.model('upgrade', upgradeSchema);
